<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <link href="/semantic-ui/semantic.min.css" rel="stylesheet">
  <link href="/editormd/css/editormd.preview.min.css" rel="stylesheet">
  <link href="/editormd/examples/css/style.css" rel="stylesheet">
  <title><%= doc.title %></title>
</head>
<body class="sidebar-right<%= locals.hidden_sidebar ? ' sidebar-hidden' : ''%>">
<aside id="sidebar" class="sidebar">
  <h1>文档内容导航</h1>
  <div id="custom-toc-container" class="markdown-body editormd-preview-container ">#custom-toc-container</div>
</aside>
<section id="editormd-view">
  <textarea id="editormd-markdown-doc" title="content" style="display: none"><%= doc.content %></textarea>
</section>
<script src="/javascripts/jquery.min.js"></script>
<script src="/editormd/lib/marked.min.js"></script>
<script src="/editormd/lib/raphael.min.js"></script>
<script src="/editormd/lib/prettify.min.js"></script>
<script src="/editormd/lib/flowchart.min.js"></script>
<script src="/editormd/lib/underscore.min.js"></script>
<script src="/editormd/lib/jquery.flowchart.min.js"></script>
<script src="/editormd/lib/sequence-diagram.min.js"></script>
<script src="/editormd/editormd.min.js"></script>
<script>
  var htmlView = editormd.markdownToHTML("editormd-view", {
    markdown: $("#editormd-markdown-doc").text(), // Markdown content "\r\n"
    tocContainer: "#custom-toc-container", // 自定义 ToC 容器层
    htmlDecode: "style,script,iframe",  // 开启 HTML 标签解析，为了安全性: ilter tags decode // 默认不开启
    sequenceDiagram: true,  // 解析时序图
    flowChart: true,  // 解析流程图
    taskList: true,
    emoji: true,
    tocm: true,    // Using [TOCM]
    tex: true  // 默认不解析
    // gfm: false,
    // tocDropdown: true,
    // markdownSourceCode : true, // 是否保留 Markdown 源码，即是否删除保存源码的 Textarea 标签

    // 获取Markdown源码
    // console.log(htmlView.getMarkdown());
  });
</script>
</body>
</html>